package com.longrise.umeng.share;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;

import com.longrise.umeng.R;

/**
 * Created by Administrator on 2017/12/20.
 * 友盟分享的BaseDialog
 */

public abstract class ShareBaseDialog extends Dialog{

    /**
     * 默认为InPutDialog style
     */
    public ShareBaseDialog(Context context) {
        this(context, R.style.InPutDialog);
        setCanceledOnTouchOutside(false);
    }

    /**
     * 如果需要其他style 请使用该构造函数
     */
    public ShareBaseDialog(Context context, int style) {
        super(context, style);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getLayoutResourceId(savedInstanceState));

        init();
        regEvent();
    }

    public abstract int getLayoutResourceId(Bundle bundle);

    public abstract void init();

    public abstract void regEvent();


}
